package com.shawn.integeration.business.service;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * 任务执行通知监听器
 *
 * @author: shawn
 * @Date: 2024/1/31 17:09
 * @Version 1.0.0
 */

@Component
@Slf4j
@RocketMQMessageListener(topic = "shawn_job_exec_inform", consumerGroup = "shawn-group")
public class JobExecInformListener implements RocketMQListener<String> {

    @Override
    public void onMessage(String s) {
        log.info("接收到MQ消息 {}", s);

        // 进行短信通知或者邮件通知。。。
    }
}
